<%--
  Created by IntelliJ IDEA.
  User: 旷鸿宇
  Date: 2019/3/10
  Time: 9:36
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>Title</title>
    <style>
        td{
            w
        }
    </style>
        <script type="text/javascript" src="<%=basePath%>js/jquery-1.11.0.min.js"></script>

</head>
<body>

    <center>
        <h1><a href="<%=basePath%>add.jsp">增加</a></h1>
        <table id="taDate">
            <tr>
                <td>
                    编号
                </td>
                <td>
                账号
                </td>
                <td>
                密码
                </td>
                <td>
                 操作
                 </td>
            </tr>

        </table>
    </center>

    <script type="text/javascript">
        $(function () {

              $.ajax({
                url :"<%=basePath%>sys/index",
                type:"POST",
                data:{},
                dataType :"",
                success: function (data) {

                     $.each(data,function (i,item) {

                         var de ="删除";
                         var gai ="修改"
                         var tr = "<tr>"+
                            "<td>" + item.id+ "</td>"+
                            "<td>" + item.name + "</td>"+
                            "<td>" + item.pwd + "</td>" +
                            "<td>" + "<a href='<%=basePath%>sys/delete?id="+item.id+"'>"+de+ "</a>"+
                             "<a id='dele' href='<%=basePath%>video.jsp?aaid="+item.id+"'>"+gai+ "</a>"+

                             "</td>" +
                            "</tr>";
                        $("#taDate").append(tr);
                    })
                }
            });


        })

        

    </script>

</body>
</html>
